<template>
  <div class="Gags-detail pages-box">
    <div class="header flex-center">
      <i class="iconfont icon-dajiantou" @click="$router.go(-1)"></i>精彩花絮
      <i class="iconfont icon-gengduo"></i>
    </div>
    <div class="section">
      <div class="content">
        <div class="title">{{ info.title }}</div>
        <div class="desc-box flex-between">
          <div class="left">发布单位：{{ info.brandName || "--" }}</div>
          <div class="right">{{ info.createTime }}</div>
        </div>
        <div class="desc-box flex-between">
          <div class="left">审核单位：{{ info.auditName || "--" }}</div>
          <div class="right flex-align">
            <div class="flex-align">
              <i class="iconfont icon-yanjing"></i>
              {{ info.browseNum || 0 }}
            </div>
            <div class="flex-align">
              <i class="iconfont icon-dianzan"></i>
              {{ info.praiseNum || 0 }}
            </div>
            <!-- <i class="iconfont icon-edit"></i> -->
          </div>
        </div>
        <div class="detail-info" v-html="info.newsContext"></div>
        <!-- 品牌首页的交友品牌 -->
        <div class="aa aa1">
          <div class="bland-box">
            <div class="bland-box-img">
              <img v-lazy="brandDetails.publicity" alt="" />
              <!--            <img src="https://jyly-img.hzgsredcross.org.cn/img/yang/temp/%E4%B8%8B%E8%BD%BD_1639903913981.png" alt="">-->
            </div>
            <div class="con">
              <div class="bland-title" style="font-size:18px;font-weight:bold;">{{ brandDetails.brandName }}</div>
              <div class="bland-desc">
                {{ brandDetails.introduce }}
              </div>
              <!--          <div class="join-btn flex-center" @click="join(brandDetails.id)">-->
              <!--            加入会员-->
              <!--          </div>-->
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getfsNewsinfo } from "@/api/activity";
import {getbrandinfo} from "../api/brand";
export default {
  data() {
    return {
      info: {
        title: "全球首座：我国 20 万千瓦高温气冷堆核电示范工程今年发电",
      },
      brandDetails: []
    };
  },
  created() {
    this.getInfo();
    this.getByInfo()
  },
  methods: {
    getByInfo(){
      getbrandinfo({id:this.$route.query.brandId}).then(res=>{
        this.brandDetails = res.data
        console.log(this.brandDetails,"1999");
      })
    },
    // 获取花絮详情
    getInfo() {
      getfsNewsinfo({
        id: this.$route.query.id,
      })
        .then((res) => {
          console.log(res);
          if (res.code === 0) {
            this.info = res.data;
          } else {
            this.$toast(res.msg);
          }
        })
        .catch((err) => {
          this.$toast("数据获取失败，请稍后重试！");
        });
    },
  },
};
</script>
<style lang="less">
.Gags-detail {
  .header {
    .icon-gengduo {
      right: 15px !important;
      font-size: 25px;
    }
  }
  .section {
    background: #fff;
  }
  .content {
    padding: 10px 16px;
    .title {
      font-size: 18px;
      font-weight: 600;
      color: #333333;
      margin-bottom: 15px;
    }
    .desc-box {
      margin: 5px 0;
      .left {
        font-size: 11px;
        font-weight: 400;
        color: #4c4c4c;
      }
      .right {
        font-size: 11px;
        font-weight: 400;
        color: #b3b5b9;
        div {
          margin: 0 6px;
        }
        .iconfont {
          margin-right: 3px;
        }
        .icon-dianzan {
          margin-top: -5px;
        }
        .icon-edit {
          margin-left: 6px;
          font-size: 12px;
        }
      }
    }
    .detail-info {
      margin-top: 23px;
      color: #333333;
      line-height: 28px;
      p,
      span {
        font-size: 14px !important;
      }
      img {
        width: 100%;
      }
    }
  }
}
</style>
